<template>
	<view class="editNotify">
		<comHead :title="'修改群公告'" :isLeft="true" :isRight="false"></comHead>
		<view class="textareaBox">
			<textarea value="" v-model="value" placeholder="请输入群公告"/>
		</view>
		<view class="btn" @click="doEditQunnotice">
			<text>完成</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: "",
				id:''
			}
		},
		onLoad(options) {
			this.id = options.id
		},
		methods: {
			async doEditQunnotice() {
				const res = await this.$myRequest({
					url: 'api/qun/doEditQunnotice',
					data: {
						qun_id: this.id,
						notice:this.value
					}
				})
				if (res.code == 1) {
					console.log(res)
					this.$tools.showTx(res.msg)
					setTimeout(()=>{
						this.$tools.toBack()
					},1000)
				}
			},
		}
	}
</script>

<style lang="less" scoped>
	.editNotify {
		display: flex;
		flex-direction: column;
		align-items: center;
		height: 100vh;


		.textareaBox {
			width: 670rpx;
			height: 362rpx;
			background: rgba(42, 40, 50, 0.8);
			border-radius: 30rpx;
			padding: 30rpx;
			box-sizing: border-box;
			margin-top: 30rpx;

			textarea {
				font-size: 30rpx;
				color: #fff;
			}
		}

		.btn {
			width: 682rpx;
			height: 80rpx;
			background: linear-gradient(270deg, #5F58FD 0%, #62B6FC 100%);
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 30rpx;
			color: #fff;
			border-radius: 60rpx;
			margin-top: 50rpx;
		}
	}
</style>
